package org.zhadoop.stream.cql;

import java.io.InputStream;
import java.io.PrintStream;

public class CQLSessionState {
	
	/**
	 * 正常状态
	 */
	public static final int STATE_OK = 0;
	
	/**
	 * 未知错误
	 */
	public static final int STATE_UNKOWN_ERROR = 1;
	
	/**
	 * 正常退出
	 */
	public static final int STATE_NORMAL_EXIT = 2;
	
	/**
	 * 命令执行异常
	 */
	public static final int STATE_CMD_ERROR = 3;
	
	/**
	 *是否是静默模式 
	 */
	private boolean isSlient = false;
	
	private InputStream in;
	
	private PrintStream out;
	
	private PrintStream info;
	
	private PrintStream err;
	
	private String fileName;

	/**
	 * 关闭session
	 */
	public void close(){
		
	}
	
	public boolean isSlient() {
		return isSlient;
	}

	public void setSlient(boolean isSlient) {
		this.isSlient = isSlient;
	}

	public InputStream getIn() {
		return in;
	}

	public void setIn(InputStream in) {
		this.in = in;
	}

	public PrintStream getOut() {
		return out;
	}

	public void setOut(PrintStream out) {
		this.out = out;
	}

	public PrintStream getInfo() {
		return info;
	}

	public void setInfo(PrintStream info) {
		this.info = info;
	}

	public PrintStream getErr() {
		return err;
	}

	public void setErr(PrintStream err) {
		this.err = err;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public static int getStateOk() {
		return STATE_OK;
	}

	public static int getStateUnkownError() {
		return STATE_UNKOWN_ERROR;
	}	
}
